<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class UploadController extends Controller
{
    public function save(Request $i) {
        $files  = $i->allFiles();
        $urls   = [];
        foreach ($files as $file) {
            $url = $file->storeAs('upload', time().'.'.$file->getClientOriginalExtension());
            $urls[] = url($url);
        }

        return $urls;
    }
}
